Optimal. Leaf size=116 \[ -\frac {g^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {g} \tan (e+f x)}{\sqrt {2} \sqrt {g \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f}+\frac {g \cot (e+f x) \sqrt {g \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}{a c f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 150, normalized size of antiderivative = 1.29, number of steps
used = 4, number of rules used = 4, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {4049, 96, 95,
211} \begin {gather*} \frac {g^{3/2} \tan (e+f x) \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {c} \sqrt {g \sec (e+f x)}}{\sqrt {g} \sqrt {c-c \sec (e+f x)}}\right )}{\sqrt {2} \sqrt {c} f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}-\frac {g \tan (e+f x) \sqrt {g \sec (e+f x)}}{f \sqrt {a \sec (e+f x)+a} (c-c \sec (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 95
Rule 96
Rule 211
Rule 4049
Rubi steps
\begin {align*} \int \frac {(g \sec (e+f x))^{3/2}}{\sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))} \, dx &=-\frac {(a c g \tan (e+f x)) \text {Subst}\left (\int \frac {\sqrt {g x}}{(a+a x) (c-c x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {g \sqrt {g \sec (e+f x)} \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac {\left (a g^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {g x} (a+a x) \sqrt {c-c x}} \, dx,x,\sec (e+f x)\right )}{2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {g \sqrt {g \sec (e+f x)} \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac {\left (a g^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{a g+2 a c x^2} \, dx,x,\frac {\sqrt {g \sec (e+f x)}}{\sqrt {c-c \sec (e+f x)}}\right )}{f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {g \sqrt {g \sec (e+f x)} \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))}+\frac {g^{3/2} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {c} \sqrt {g \sec (e+f x)}}{\sqrt {g} \sqrt {c-c \sec (e+f x)}}\right ) \tan (e+f x)}{\sqrt {2} \sqrt {c} f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(236\) vs. \(2(116)=232\).
time = 2.83, size = 236, normalized size = 2.03 \begin {gather*} -\frac {a \cos \left (\frac {1}{2} (e+f x)\right ) (g \sec (e+f x))^{5/2} \sin ^3\left (\frac {1}{2} (e+f x)\right ) \left (-4-4 \sec (e+f x)+\frac {\left (\log \left (1-2 \sec (e+f x)-3 \sec ^2(e+f x)-2 \sqrt {2} \sqrt {\sec (e+f x)} \sqrt {1+\sec (e+f x)} \sqrt {\tan ^2(e+f x)}\right )-\log \left (1-2 \sec (e+f x)-3 \sec ^2(e+f x)+2 \sqrt {2} \sqrt {\sec (e+f x)} \sqrt {1+\sec (e+f x)} \sqrt {\tan ^2(e+f x)}\right )\right ) \sqrt {\tan ^2(e+f x)}}{\sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )}}\right )}{c f g (-1+\sec (e+f x))^2 (a (1+\sec (e+f x)))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.98, size = 152, normalized size = 1.31
method | result | size |
default | \(\frac {\left (\arcsinh \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}\right ) \sqrt {2}\, \cos \left (f x +e \right )-\arcsinh \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}\right ) \sqrt {2}-2 \sin \left (f x +e \right ) \sqrt {\frac {1}{\cos \left (f x +e \right )+1}}\right ) \left (\frac {g}{\cos \left (f x +e \right )}\right )^{\frac {3}{2}} \left (-1+\cos \left (f x +e \right )\right ) \left (\cos ^{2}\left (f x +e \right )\right ) \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}}{2 c f \left (\frac {1}{\cos \left (f x +e \right )+1}\right )^{\frac {3}{2}} \sin \left (f x +e \right )^{4} a}\) | \(152\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 576 vs.
\(2 (103) = 206\).
time = 0.60, size = 576, normalized size = 4.97 \begin {gather*} \frac {{\left (4 \, g \cos \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) - 4 \, g \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) - {\left (g \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} + g \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} - 2 \, g \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + g\right )} \log \left (\cos \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} + \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} + 2 \, \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 1\right ) + {\left (g \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} + g \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} - 2 \, g \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + g\right )} \log \left (\cos \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} + \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} - 2 \, \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 1\right ) + 4 \, g \sin \left (\frac {1}{4} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )\right )} \sqrt {g}}{2 \, {\left (\sqrt {2} c \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} + \sqrt {2} c \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )^{2} - 2 \, \sqrt {2} c \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + \sqrt {2} c\right )} \sqrt {a} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.86, size = 356, normalized size = 3.07 \begin {gather*} \left [\frac {\sqrt {2} a g \sqrt {\frac {g}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {g}{a}} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + g \cos \left (f x + e\right )^{2} - 2 \, g \cos \left (f x + e\right ) - 3 \, g}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 4 \, g \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{4 \, a c f \sin \left (f x + e\right )}, \frac {\sqrt {2} a g \sqrt {-\frac {g}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {-\frac {g}{a}} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{g \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 2 \, g \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {g}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{2 \, a c f \sin \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\left (g \sec {\left (e + f x \right )}\right )^{\frac {3}{2}}}{\sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )} - \sqrt {a \sec {\left (e + f x \right )} + a}}\, dx}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^{3/2}}{\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________